package com.school.test;
import com.school.entity.Student;
import com.school.entity.Teacher;
import com.school.entity.Course;
public class Test {
    public static void main(String[] args) {
        System.out.println("===== 第一步：创建教师对象 =====");
        Teacher teacher1 = new Teacher(1, "张老师");
        Teacher teacher2 = new Teacher(2, "李老师");
        System.out.println("\n===== 第二步：创建课程对象 =====");
        Course course1 = new Course(1, "Java应用开发技术", "2501教室", "周四上午");
        Course course2 = new Course(2, "Java实验课", "实验楼0921", "周四下午");
        System.out.println("\n===== 第三步：教师开课 =====");
        teacher1.offerCourse(course1);
        teacher2.offerCourse(course2);
        System.out.println("\n===== 第四步：创建学生对象 =====");
        Student student1 = new Student(101, "张三");
        Student student2 = new Student(102, "李四");
        System.out.println("\n===== 第五步：学生选课 =====");
        student1.selectCourse(course1);
        student2.selectCourse(course2);
        System.out.println("\n===== 第六步：学生退课 =====");
        student2.dropCourse();
        System.out.println("\n===== 第七步：打印学生课表 =====");
        student1.printWorksheet();
        System.out.println("------------------------");
        student2.printWorksheet();
        System.out.println("\n===== 第八步：打印教师授课表 =====");
        teacher1.printWorksheet();
        System.out.println("------------------------");
        teacher2.printWorksheet();
    }
}